<template>
  <div class="container-wrap">
    <bodyWrap :isShow="bodyShow" :id="'ew'">
      <div slot="body" v-if="bodyShow">
        <!--基本详情返现-->
        <detail-template
          :title="`详情`"
          :list="details.baseInfo">
        </detail-template>

        <!--资产信息-->
        <div class="d-item-wrap" v-if="assetList.length">
          <div class="d-title">
            资产信息
          </div>
          <div class="d-content">
            <div class="item" v-for="item in assetList">
              <div class="label">
                {{item.name}}
                <span class="plus-txt-wrap" @click="checkAsset(item.list)">查看资产</span>
              </div>
            </div>
          </div>
        </div>

        <!--专家研判信息-->
        <!--<zjJudgeList :id="id" v-if="isCenter"></zjJudgeList>-->

        <transition-group name="fadeShow">
          <!--响应要求-->
          <div class="advice-wrap" v-if="details.replyClaim && details.control.replyClaim" :key="1">
            <div class="title">响应要求</div>
            <div class="content">
              <div class="item">
                <pre class="txt" v-html="details.replyClaim"></pre>
              </div>
            </div>
          </div>
          <!--地方网信办反馈统计-->
          <div class="d-item-wrap"
               v-if="$store.state.downsSet && $store.state.downsSet.length && details.control.replyClaim" :key="2">
            <div class="d-title">
              响应反馈(共下发 <span class="blue1Color">{{details.totalNum}}</span> 家，<span
              class="blue1Color">{{details.feedbackNum}}</span>
              家反馈[其中<span class="greenColor">{{details.overFeedbackNum}}</span>家超时反馈]，<span
              class="redColor">{{details.noFeedbackNum}}</span> 家未反馈)
            </div>
            <div class="d-content">
              <div class="item fold-hide" v-for="item in $store.state.downsSet">
                <div class="feedBack-item">
                  <div class="fb-label">当前状态：</div>
                  <div>{{item.stateTxt}}</div>
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">单位：</div>
                  {{item.orgName}}
                </div>
                <!--<div class="feedBack-item" v-if="item.btn">-->
                <!--<div class="fb-label">反馈详情：</div>-->
                <!--<div class="btn" @click="goFeedBackHistory(item,2)">查看详情</div>-->
                <!--</div>-->
                <div class="feedBack-item" v-if="item.status != 2">
                  <div class="fb-label">操作：</div>
                  <div class="btn" v-if="item.status === 0" @click="feedBackEnd(item,1)">终止反馈</div>
                  <div class="btn" v-if="item.status === 1" @click="dealFeedBack(item,1)">处理</div>
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">流转记录：</div>
                  <div class="btn" @click="goFeedBackHistory(item,1)">查看记录</div>
                </div>
              </div>
            </div>
            <foldWrap :list="$store.state.downsSet"></foldWrap>
          </div>
          <!--协调处置要求-->
          <div class="advice-wrap" v-if="details.handleClaim && details.control.handleClaim" :key="3">
            <div class="title">协调处置要求</div>
            <div class="content">
              <div class="item fold-hide">
                <pre class="txt" v-html="details.handleClaim"></pre>
              </div>
            </div>
          </div>
          <!--协调处置反馈统计-->
          <div class="d-item-wrap"
               v-if="$store.state.manufacturers && $store.state.manufacturers.length && details.control.handleClaim"
               :key="4">
            <div class="d-title">
              协调处置反馈(共下发<span class="blue1Color"> {{details.totalManuf}} </span> 家，<span
              class="blue1Color"> {{details.hadSubmit}} </span>
              家反馈[其中<span class="greenColor">{{details.overHadSubmit}}</span>家超时反馈]，<span
              class="redColor">{{details.havingSubmit}}</span> 家未反馈)
            </div>
            <div class="d-content">
              <div class="item fold-hide" v-for="item in $store.state.manufacturers">
                <div class="feedBack-item">
                  <div class="fb-label">当前状态：</div>
                  <div>{{item.stateTxt}}</div>
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">单位：</div>
                  {{item.orgName}}
                </div>
                <!--<div class="feedBack-item" v-if="item.btn">-->
                <!--<div class="fb-label">反馈详情：</div>-->
                <!--<div class="btn" @click="goFeedBackHistory(item,2)">查看详情</div>-->
                <!--</div>-->
                <div class="feedBack-item" v-if="item.status != 2">
                  <div class="fb-label">操作：</div>
                  <div class="btn" v-if="item.status === 0" @click="feedBackEnd(item,2)">终止反馈</div>
                  <div class="btn" v-if="item.status === 1" @click="dealFeedBack(item,2)">处理</div>
                </div>
                <div class="feedBack-item">
                  <div class="fb-label">流转记录：</div>
                  <div class="btn" @click="goFeedBackHistory(item,2)">查看记录</div>
                </div>
              </div>
            </div>
            <foldWrap :list="$store.state.manufacturers"></foldWrap>
          </div>
        </transition-group>

        <!--领导意见返现-->
        <leaderAdviseList v-if="details.control.leaderAdvise"></leaderAdviseList>

        <!--领导流程-->
        <template v-if="details.control.leaderSubmit">
          <div class="d-item-wrap">
            <div class="d-title">
              领导审核
            </div>
            <div class="d-content">
              <div class="item">
                <div class="label">
                  <!--<span class="neededFlag"></span>-->
                  批示意见
                  <voice-txt-area></voice-txt-area>
                </div>
                <div class="txt">
                  <textarea id="ldv" class="txt-area" placeholder="点击输入文字"></textarea>
                </div>
              </div>
            </div>
          </div>
          <!--按钮区域-->
          <div class="btn-wrap">
            <div class="btn-b" @click="goLeaders()">请示领导</div>
            <div class="btn-b" @click="eventSubmit(2)">同意</div>
            <div class="btn-b" @click="eventSubmit(3)">退回</div>
          </div>
        </template>

        <!--值班员请示流程-->
        <template v-if="details.control.zbyAsk">
          <div class="d-item-wrap">
            <div class="d-title">
              请示领导
            </div>
            <div class="d-content">
              <div class="item">
                <div class="label">
                  <!--<span class="neededFlag"></span>-->
                  请示意见
                  <voice-txt-area></voice-txt-area>
                </div>
                <div class="txt">
                  <textarea id="ldv" class="txt-area" placeholder="点击输入文字"></textarea>
                </div>
              </div>
            </div>
          </div>
          <!--按钮区域-->
          <div class="btn-wrap">
            <div class="btn-b" @click="goLeaders()">请示领导</div>
            <div class="btn-b" @click="eventSubmit(4)">归档</div>
          </div>
        </template>

        <!--值班员发布流程-->
        <template v-if="details.control.zbyRelease">
          <!--下发地方网信办-->
          <div class="d-item-wrap">
            <div class="d-title">
              发布
            </div>
            <div class="d-content">
              <!--反馈内容-->
              <div class="item">
                <div class="label">
                  反馈内容
                  <span class="plus-txt-wrap" @click="goFeedBackItem(1)">
                    添加
                  </span>
                </div>
                <div class="txt txt-checked-item-wrap">
                  <div class="txt-checked-item"
                       v-for="(item,index) in $store.state.feedBackItemCheck"
                       :key="index"
                       @click="_deleteFeedBackItemCheck(index,'feedBackItemCheck')">
                    {{item.label}}
                  </div>
                </div>
              </div>
              <!--请选择响应单位-->
              <div class="item" @click="goOrgList(3)">
                <div class="label">
                  <div class="neededFlag"></div>
                  请选择响应单位
                </div>
                <div class="txt txt-chose wordHidden-2">
                  {{$store.state.orgChecked.txt}}
                </div>
              </div>
              <!--响应要求-->
              <div class="item">
                <div class="label">
                  <span class="neededFlag"></span>
                  响应要求
                  <voice-txt-area></voice-txt-area>
                </div>
                <div class="txt">
                  <textarea class="txt-area"
                            id="replyClaim"
                            placeholder="点击输入文字"></textarea>
                </div>
              </div>
              <!--工具包-->
              <div class="item" v-if="false">
                <div class="label">
                  工具包
                  <div class="plus-txt-wrap">
                    <div class="file-wrap">
                      上传
                      <input type="file" class="file-input" @change="_addFile($event)">
                    </div>
                  </div>
                </div>
                <div class="txt">
                  <div class="txt-checked-item txt-checked-item-file"
                       v-if="files.length"
                       v-for="(file,index) in files"
                       :key="index"
                       @click="_deleteFile(file,index)">
                    {{file.fileName}}
                  </div>
                </div>
              </div>
            </div>
          </div>
          <!--协调处置 // 跟踪要求-->
          <div class="d-item-wrap">
            <div class="d-title">
              协调处置
            </div>
            <div class="d-content">
              <!--反馈内容-->
              <div class="item">
                <div class="label">
                  反馈内容
                  <span class="plus-txt-wrap" @click="goFeedBackItem(1,2)">
                    添加
                  </span>
                </div>
                <div class="txt txt-checked-item-wrap">
                  <div class="txt-checked-item"
                       v-for="(item,index) in $store.state.feedBackItemCheckSafe"
                       :key="index"
                       @click="_deleteFeedBackItemCheck(index,'feedBackItemCheckSafe')">
                    {{item.label}}
                  </div>
                </div>
              </div>
              <!--协调处置机构或厂商-->
              <div class="item" @click="goOrgList(5)">
                <div class="label">
                  请选择安全厂商
                </div>
                <div class="txt txt-chose wordHidden-2">
                  {{$store.state.dwChecked.txt}}
                </div>
              </div>
              <!--处置要求-->
              <div class="item">
                <div class="label">
                  <!--<span class="neededFlag"></span>-->
                  跟踪要求
                  <voice-txt-area></voice-txt-area>
                </div>
                <div class="txt">
                    <textarea class="txt-area"
                              id="handleClaim"
                              placeholder="点击输入文字"></textarea>
                </div>
              </div>
            </div>
          </div>
          <!--按钮区域-->
          <div class="btn-wrap">
            <div class="btn-b" @click="eventAndWarnPublish">发布</div>
            <div class="btn-b" @click="eventSubmit(4)">归档</div>
          </div>
        </template>

        <!--专家研判-->
        <template v-if="details.control.zjJudge">
          <div class="d-item-wrap">
            <div class="d-title">
              研判意见
            </div>
            <div class="d-content">
              <div class="item">
                <div class="label">
                  <!--<span class="neededFlag"></span>-->
                  研判意见
                  <voice-txt-area></voice-txt-area>
                </div>
                <div class="txt">
                  <textarea id="zj" class="txt-area" placeholder="点击输入文字"></textarea>
                </div>
              </div>
            </div>
          </div>
          <!--按钮区域-->
          <div class="btn-wrap">
            <div class="btn-b" @click="eventSubmit(2)">研判</div>
          </div>
        </template>

        <!--地方 运营单位 安全厂商 反馈-->
        <template v-if="details.control.temSubmit">

          <template v-if="details.ew.downsSet && this.$store.state.userInfo.roleRank == 3">
            <!--运营单位应对要求-->
            <div class="d-item-wrap">
              <div class="d-title">
                反馈要求
              </div>
              <div class="d-content">
                <div class="item">
                  <div class="label">
                    反馈要求
                  </div>
                  <div class="txt">
                    <div class="txt-multiLine">
                      {{details.replyClaim}}
                    </div>
                  </div>
                </div>
              </div>
            </div>
            <!--运营单位反馈统计-->
            <div class="d-item-wrap">
              <div class="d-title">
                响应反馈(共下发 <span class="blue1Color">{{details.totalNum}}</span> 家，<span
                class="blue1Color">{{details.feedbackNum}}</span>
                家反馈，<span class="redColor">{{details.noFeedbackNum}}</span> 家未反馈)
              </div>
              <div class="d-content">
                <div class="item fold-hide" v-for="item in $store.state.downsSet">
                  <div class="feedBack-item">
                    <div class="fb-label">当前状态：</div>
                    <div>{{item.stateTxt}}</div>
                  </div>
                  <div class="feedBack-item">
                    <div class="fb-label">单位：</div>
                    {{item.orgName}}
                  </div>
                  <div class="feedBack-item" v-if="item.status != 2">
                    <div class="fb-label">操作：</div>
                    <div class="btn" v-if="item.status === 0" @click="feedBackEnd(item,1)">终止反馈</div>
                    <div class="btn" v-if="item.status === 1" @click="dealFeedBack(item,1)">处理</div>
                  </div>
                  <div class="feedBack-item">
                    <div class="fb-label">流转记录：</div>
                    <div class="btn" @click="goFeedBackHistory(item,3)">查看记录</div>
                  </div>
                </div>
              </div>
              <foldWrap :list="$store.state.downsSet"></foldWrap>
            </div>
          </template>
          <div class="d-item-wrap">
            <div class="d-title">
              {{details.ew.label}}
            </div>
            <div class="d-content">
              <div class="item">
                <div class="label">
                  {{details.ew.label}}
                </div>
                <div class="txt">
                  <div class="txt-multiLine">
                    {{details.ew.content}}
                  </div>
                </div>
              </div>
            </div>
          </div>
          <!--反馈记录-->
          <div class="d-item-wrap">
            <div class="d-title"></div>
            <div class="d-content">
              <div class="item">
                <div class="label">
                  流转记录
                  <span class="plus-txt-wrap" @click="checkFeedBackHistory()">查看纪录</span>
                </div>
              </div>
            </div>
          </div>
          <template-items
            v-for="(item,index) in myTaskSubmitList"
            :key="index"
            :title="'反馈'"
            :list="details.attributeList">
          </template-items>
          <div class="btn-wrap" v-if="details.control.dwSubmit">
            <div class="btn-b" @click="myTaskSubmit">提交</div>
          </div>

          <template v-if="details.control.dwPush && !details.ew.downsSet">
            <div class="d-item-wrap">
              <div class="d-title">
                下发
              </div>
              <div class="d-content">
                <!--请选择响应单位-->
                <div class="item" @click="goOrgList(3)">
                  <div class="label">
                    请选择响应单位
                  </div>
                  <div class="txt txt-chose wordHidden-2">
                    {{$store.state.orgChecked.txt}}
                  </div>
                </div>
                <!--响应要求-->
                <div class="item">
                  <div class="label">
                    反馈要求
                    <voice-txt-area></voice-txt-area>
                  </div>
                  <div class="txt">
                  <textarea class="txt-area"
                            id="replyClaim"
                            placeholder="点击输入文字"></textarea>
                  </div>
                </div>
              </div>
            </div>
            <div class="btn-wrap">
              <div class="btn-b" @click="eventAndWarnPublish" v-if="details.control.dwPush">下发</div>
            </div>
          </template>

        </template>

        <!--值班员请示流程-->
        <template v-if="details.control.zbyComplete">
          <div class="d-item-wrap">
            <div class="d-title">
              总结
            </div>
            <div class="d-content">
              <div class="item">
                <div class="label">
                  <!--<span class="neededFlag"></span>-->
                  总结
                  <voice-txt-area></voice-txt-area>
                </div>
                <div class="txt">
                  <textarea id="ldv" class="txt-area" placeholder="点击输入文字"></textarea>
                </div>
              </div>
            </div>
          </div>
          <!--按钮区域-->
          <div class="btn-wrap">
            <div class="btn-b" @click="eventSubmit(4)">归档</div>
          </div>
        </template>

        <!--值班员总结返现-->
        <div class="d-item-wrap" v-if="details.control.endShow">
          <div class="d-title">
            总结
          </div>
          <div class="d-content">
            <div class="item">
              <div class="label">
                总结
              </div>
              <div class="txt">
                <div class="txt-multiLine">
                  {{details.summary}}
                </div>
              </div>
            </div>
          </div>
        </div>

      </div>
    </bodyWrap>
    <transition name="slideRight">
      <keep-alive include="a">
        <router-view></router-view>
      </keep-alive>
    </transition>
  </div>
</template>

<script>
  import eventAndWarnDetail from "./eventAndWarnDetail.js"

  export default eventAndWarnDetail
</script>

